#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#define MaxSize 100
typedef char ElemType;
typedef struct
{
	ElemType  data[MaxSize];
	int length;
} SqList;
int main()
{
	SqList L;
	int m;
	scanf("%d", &L.length);
	for (int i = 0; i < L.length; i++) scanf("%d", &L.data[i]);
	int k,tem;
	scanf("%d", &k);
	L.length++;
	L.data[L.length - 1] = k;
	for (int i = 0; i < L.length - 1; i++) {
		int count = 0;
		for (int j = 0; j < L.length - i - 1; j++) {
			if (L.data[j] > L.data[j + 1]) {
				tem = L.data[j];
				L.data[j] = L.data[j + 1];
				L.data[j + 1] = tem;
				count = 1;
			}
		}
		if (count == 0)		break;
	}
	for (int i = 0; i < L.length; i++) printf("%d,", L.data[i]);
	return 0;
}